\hypertarget{laplace2D_8cpp}{
\subsection{Examples/03Laplace/laplace2D.cpp File Reference}
\label{laplace2D_8cpp}\index{Examples/03Laplace/laplace2D.cpp@{Examples/03Laplace/laplace2D.cpp}}
}


Solving the Laplace equation in 2D.  




\subsubsection{Detailed Description}
\begin{DoxyAuthor}{Author}
Luis M. de la Cruz Salas \mbox{[} Fri Mar 21 12:26:33 GMT 2010 \mbox{]}
\end{DoxyAuthor}
This code solves the Laplace equation in two dimensions: $ \nabla^2 T = 0 $. This equation is solved in the unit square $ (x,y) \in [0,1]\times [0,4] $. The bondary conditions for the temperature are: $ T=0 $ for $ x=0, 4$ and $ T=10 \sin (\frac{\pi}{2} x) $ for $ y=0, 1$ \begin{DoxyParagraph}{Compiling and running}
Modify the variables BASE and BLITZ in the file {\ttfamily tuna-\/cfd-\/rules.in} according to your installation and then type the next commands: \begin{DoxyVerb}
   % make
   % ./laplace2D  \end{DoxyVerb}

\end{DoxyParagraph}
The results are stored in {\ttfamily Data2D}.

The results of this example are shown in the next figures, and are plotted using OpenDX with the {\ttfamily visdat.net} script.  
\begin{DoxyImage}
\includegraphics[width=10cm]{laplace2D_01}
\caption{Boundary conditions}
\end{DoxyImage}
  
\begin{DoxyImage}
\includegraphics[width=10cm]{laplace2D_02}
\caption{Final solution}
\end{DoxyImage}
 

Definition in file \hyperlink{laplace2D_8cpp_source}{laplace2D.cpp}.

